//
//  clsDistrict.m
//  AntsExpress
//
//  Created by slccper on 16/1/18.
//  Copyright © 2016年 slccper. All rights reserved.
//

#import "clsDistrict.h"
#import "clsOtherFun.h"
@implementation clsDistrict
-(id)initWithDic:(NSDictionary *)obj
{
    self = [super init];
    if (self) {
        for (int i=0; i<obj.allKeys.count; i++) {
            if ([self respondsToSelector: [clsOtherFun selectorForColumnName:obj.allKeys[i]]]) {
                [clsOtherFun ObjectSetValue:self :obj.allKeys[i] :obj.allValues[i]];
            }
        }
    }
    return self;
}
+(NSMutableArray *)GetDataByArr:(NSArray *)list
{
    NSMutableArray *data = [NSMutableArray array];
    for (NSDictionary *dic in list) {
        clsDistrict *District = [[clsDistrict alloc]initWithDic:dic];
        [data addObject:District];
    }
    return data;
}
+(NSMutableArray *)GetTitleByArr:(NSMutableArray *)arr
{
    NSMutableArray *title = [NSMutableArray array];
    for (clsDistrict *District in arr) {
        [title addObject:District.name];
    }
    return title;
}
@end
